<!DOCTYPE html>
<html>
<#include "../../include/resource.html">
<body>
	<#assign nid="member"> 
	<#include "../../include/header.html">
	<!--header-end-->
	<!--用户中心的主栏目 开始-->
	<div id="main" class="clearfix" style="margin-top:10px;">
		<div class="wrap950 " style="margin-top:0">
			<!--左边的导航 开始-->
			<div class="user_left">
            	<#assign mid="m_invest" >
				<#include "../user_menu.html"></div>
			<!--左边的导航 结束-->

			<!--右边的内容 开始-->
			<div class="user_right">
				<#if msg?exists>
				<div id="msg24">
					<p class="ok">${msg}</p>
				</div>
				<#else> <#if errormsg?exists>
				<div id="msg25">
					<p class="error">${errormsg}</p>
				</div>
				</#if> </#if>
				<div class="user_right_menu">
					<#if status?exists>
						<#if status==0><#assign invest_type="notcollect"></#if>
						<#if status==1><#assign invest_type="hascollect"></#if>
					</#if>
					
					<#include "invest_menu.html"></div>
				<div class="user_right_main">
					<!-- V1.6.6.2 RDPROJECT-313 ljd 2013-10-22 start -->
					<#if param?exists>
						<#if param.get("repay_time1")?exists><#assign dotime1=param.get("repay_time1")></#if>
						<#if param.get("repay_time2")?exists><#assign dotime2=param.get("repay_time2")></#if>
					</#if>
					<div class="user_main_title" style="height:30px; padding-top:7px;">
						应收日期：
						<!-- v1.6.6.2 RDPROJECT-313 zza 2013-10-31 start -->
						<input type="text" name="repay_time1" id="repay_time1" value="${repay_time1!}" size="15" onclick="change_picktime()" /> 到 
						<input type="text" name="repay_time2" id="repay_time2" value="${drepay_time2!}" size="15" onclick="change_picktime()" />&nbsp;
						<!-- v1.6.6.2 RDPROJECT-313 zza 2013-10-31 end -->
						<input value="搜索" type="submit"  class="btn-action"  onclick="sousuo()" />
					</div>
					<!-- V1.6.6.2 RDPROJECT-313 ljd 2013-10-23 end -->
					<table  border="0"  cellspacing="1" class="table table-striped  table-condensed" style="width:100%">
			 			 <form cur="" method="post">
							<tr class="head" >
								<td>借款标题</td>
								<td>应收日期</td>
								<td>借款者</td>
								<td>第几期</td>
								<td>收款总额</td>
								<td>应收本金</td>
								<td>应收利息</td>
			                    <td>管理费</td>
			                    <td>实得利息</td>
								<td>逾期利息</td>
								<td>逾期天数</td>
							<#--<td>协议</td>-->
							</tr>
							<#import "../../common/function.html" as func>  
							<#list collect as item>
							<#assign ctime=dateformat(item.repay_time!0,"yyyy-MM-dd") >
							<tr >
								<td><a href="${webroot}/invest/detail.html?borrowid=${item.borrow_id?c}" target="_blank" title="${item.borrow_name}">${item.borrow_name}</a></td>
								<td <#if ctime==currentTime>style="color:red"</#if> >${ctime}</td>
								<!-- v1.6.6.1 非空验证 zza 2013-10-08 start -->
								<td>${item.username!}</td>
								<!-- v1.6.6.1 非空验证 zza 2013-10-08 end -->
								<!-- v1.6.7.2 RDPROJECT-526 xx start -->
								<td>第${item.order+1}期<#if item.borrow_style=='5'&&item.time_limit?exists>/总共${item.time_limit?number+1}期<#elseif item.borrow_style!='2'&&item.time_limit?exists>/总共${item.time_limit}期<#else>/总共${item.order+1}期</#if></td>
								<!-- v1.6.7.2 RDPROJECT-526 xx end -->
								<td>￥${func.format2(item.repay_account)}</td>
								<td>￥${func.format2(item.capital)}</td>
								<td>￥${func.format2(item.interest)}</td>
								<!-- v1.6.6.1 RDPROJECT-84 zza 2013-09-23 start -->
			                    <td>
			      					<#if item??&&item.manage_fee??>              
			                   		 	￥${func.format2(item.manage_fee)}
			                   		</#if>
			                   	</td>
			                    <td>
			                    	<#if item??&&item.manage_fee??>              
			                    		<!-- v1.6.6.1 RDPROJECT-242 zza 2013-09-30 start -->
			                   		 	￥${((item.interest)?number-(item.manage_fee)?number)?string("##.##")}
			                   		 	<!-- v1.6.6.1 RDPROJECT-242 zza 2013-09-30 end -->
			                   		</#if>
			                    </td>
			                    <!-- v1.6.6.1 RDPROJECT-84 zza 2013-09-23 end -->
								<td>￥${func.format2(item.late_interest)}</td>
								<td>${item.late_days}天</td>
				<#--			<td><a href="${webroot}/borrow/protocol.html?id=${item.borrow_id?c}&tender_id=${item.id?c}&type=new">下载<a></td>-->
							</tr>
							</#list>
							<tr>
								<td colspan="12" class="page">
									<div align="center">
										<#import "../../common/page.html" as pager>  
					         	 		<@pager.pagination page=page url="/member/invest/collect.html" map=param style="style1"  /> 
									</div>
								</td>
							</tr>
						</form>
						<!-- v1.6.6.1 RDPROJECT-347 zza 2013-10-15 start -->
						<div><font style="color: red;">* 实际管理费以还款时扣除为准！</font></div>
						<!-- v1.6.6.1 RDPROJECT-347 zza 2013-10-15 start -->
					</table>
				</div>
			</div>
			<!--右边的内容 结束-->
		</div>
	</div>
	<!-- V1.6.6.2 RDPROJECT-313 ljd 2013-10-23 start -->
	<script>
		var url = "collect.html?status=${status}";
		function sousuo() {
			var _url = "";
			// v1.6.6.2 RDPROJECT-313 zza 2013-10-31 start
			var repay_time1 = jQuery("#repay_time1").val();
			var repay_time2 = jQuery("#repay_time2").val();
			if (repay_time1 != null) {
				_url += "&repay_time1=" + repay_time1;
			}
			if (repay_time2 != null) {
				_url += "&repay_time2=" + repay_time2;
			}
			// v1.6.6.2 RDPROJECT-313 zza 2013-10-31 end
			if (status != "") {
				_url += "&status=" + status;
			}

			location.href = url + _url;
		}
	</script>
	<!-- V1.6.6.2 RDPROJECT-313 ljd 2013-10-23 end -->
	<!--用户中心的主栏目 结束-->
	<script
		src="${request.getContextPath()}${theme_dir}/media/js/modal.js"></script>

	<#include "../../include/footer.html">
</body>
</html>